<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
      <title>GTL - Graph Template Library: node_map&lt; T, Alloc &gt; Class Template Reference</title>
      <link href="doxygen.css" rel="stylesheet" type="text/css">
  </head>
  <body>
    <p class="links">  
      <a href="../index.html">Home</a> |
      Documentation |
      <a href="../register.html">Download</a> |
      <a href="../platforms.html">Platforms</a> |
      <a href="../refer.html">Projects</a> |      
      <a href="../lists.html">Mailing Lists</a> |
      <a href="../history.html">Version History</a>
    </p>

<!-- Generated by Doxygen 1.5.3 -->
<div class="tabs">
  <ul>
    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
    <li class="current"><a href="classes.html"><span>Classes</span></a></li>
    <li><a href="files.html"><span>Files</span></a></li>
    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
  </ul>
</div>
<div class="tabs">
  <ul>
    <li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
  </ul>
</div>
<h1>node_map&lt; T, Alloc &gt; Class Template Reference</h1><!-- doxytag: class="node_map" --><!-- doxytag: inherits="ne_map&lt; node, T, graph, Alloc &gt;" -->A specialized map with nodes as keys.  
<a href="#_details">More...</a>
<p>
<div class="dynheader">
Inheritance diagram for node_map&lt; T, Alloc &gt;:</div>
<div class="dynsection">
<p><center><img src="a00180.gif" border="0" usemap="#a00181" alt="Inheritance graph"></center>
<map name="a00181">
<area shape="rect" href="a00019.html" title="ne_map\&lt; node, T, graph, Alloc \&gt;" alt="" coords="5,7,221,31"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>
<div class="dynheader">
Collaboration diagram for node_map&lt; T, Alloc &gt;:</div>
<div class="dynsection">
<p><center><img src="a00182.gif" border="0" usemap="#a00183" alt="Collaboration graph"></center>
<map name="a00183">
<area shape="rect" href="a00019.html" title="ne_map\&lt; node, T, graph, Alloc \&gt;" alt="" coords="5,7,221,31"></map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center></div>

<p>
<a href="a00184.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00021.html#7a4c767f07f348d31a1004776485d17b">node_map</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00021.html#5bd24349e3a56379592889abbe4c6b09">node_map</a> (const <a class="el" href="a00014.html">graph</a> &amp;g, T t=T())</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T, class Alloc = allocator&lt;T&gt;&gt;<br>
 class node_map&lt; T, Alloc &gt;</h3>

A specialized map with nodes as keys. 
<p>
A <code><a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a></code> is a specialized and optimized map implementation with nodes as keys. Using a <code><a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a></code> is the standard way to attach user defined information to the nodes of a <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code>.<p>
An example of usage: <pre>
   <a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a> g;</pre><p>
<pre>   <a class="el" href="a00020.html" title="A node in a graph.">node</a> v1 = g.new_node();
   <a class="el" href="a00020.html" title="A node in a graph.">node</a> v2 = g.new_node();</pre><p>
<pre>   <a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a>&lt;string&gt; label(g, "Default Label");</pre><p>
<pre>   label[v1] = "v1";
   label[v2] = "v2";</pre><p>
<pre>   assert(label[v1] != label[v2]);
 </pre><p>
The nodes used as keys for a <code><a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a></code> MUST be nodes of the same <a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a>. If you want to use nodes from different graphs, use a <code>map&lt;<a class="el" href="a00020.html" title="A node in a graph.">node</a>,T&gt;</code> instead. A <a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a> and a copy of it are considered to be different.<p>
Most of the functionality of <code><a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a></code> is inherited from <a class="el" href="a00019.html">ne_map</a>.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="a00011.html" title="A specialized map with edges as keys.">edge_map</a> </dd></dl>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="7a4c767f07f348d31a1004776485d17b"></a><!-- doxytag: member="node_map::node_map" ref="7a4c767f07f348d31a1004776485d17b" args="()" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class Alloc = allocator&lt;T&gt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00021.html">node_map</a>&lt; T, Alloc &gt;::<a class="el" href="a00021.html">node_map</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructs an empty <code><a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a></code> not associated with any <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code>. You may (but need not) call <code>ne_map::init(const graph &amp;, T)</code> to associate it to a <code><a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a></code>. 
</div>
</div><p>
<a class="anchor" name="5bd24349e3a56379592889abbe4c6b09"></a><!-- doxytag: member="node_map::node_map" ref="5bd24349e3a56379592889abbe4c6b09" args="(const graph &amp;g, T t=T())" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T, class Alloc = allocator&lt;T&gt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00021.html">node_map</a>&lt; T, Alloc &gt;::<a class="el" href="a00021.html">node_map</a>           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="a00014.html">graph</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>g</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">T&nbsp;</td>
          <td class="paramname"> <em>t</em> = <code>T()</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [inline, explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructs a <code><a class="el" href="a00021.html" title="A specialized map with nodes as keys.">node_map</a></code> associated to the <a class="el" href="a00014.html" title="A directed or undirected graph.">graph</a> <code>g</code>. The value associated to each <a class="el" href="a00020.html" title="A node in a graph.">node</a> in <code>g</code> is set to <code>t</code>. 
</div>
</div><p>
    <p class="links">
      <a href="http://www.uni-passau.de/">University of Passau</a>
      &nbsp;-&nbsp;
      <a href="http://www.fmi.uni-passau.de/">FMI</a>
      &nbsp;-&nbsp;
      <a href="http://www.fmi.uni-passau.de/fmi/lehrstuehle/brandenburg/">Theoretical
	Computer Science</a>
    </p>
  <div class="copyright">
      Design &copy; 2002, 2003 <a href="mailto:raitner@fmi.uni-passau.de">Marcus Raitner</a>,  University of Passau 
  </div>
</body>
</html>
